<?php
/* ************************************************** *\
 * @company		: NovaITech							  *	
 * @author		: van.vo@novaitech.com				  * 
 * @copyright	: 2012								  * 
 * ================================================== *
 * @date		: 2/27/2012
 * @project		: CodeGenerater
 * @description	:
 *		- 
 *
\* ************************************************** */
class CodegenConfig{
    
   var $name = true;
   var $username = true;
   var $password = false;
   var $email = true;
   
    
    function get_name(){
        global $name;
        return $name;
    }
    
    function set_name($value){
        $this->name = $value;
    }
    
    function set_value($option = array()){
        for($i = 0; $i < count($option); $i++){  
            if(isset($option[$i])){
                echo $option[$i];

                if($option[$i] == 'name')
                {    $this->set_name(true);}
                else
                   { $this->set_name(false);}
                        
                if(strtolower($option[$i]) == 'username'){
                   
                    $this->username = true;
                }else{
                    $this->username = false;
                }
                    
                if($option[$i] == 'password')
                    $this->password = true;
                else
                    $this->password = false;
                    
                if($option[$i] == 'email')
                    $this->email = true;
                else
                    $this->email = false;
            }
        }
            
    }
    
    function get_all_array(){
        return $this->data;
    }
    
    function set_array_required($checked = array()){
        $this->set_value($checked);
        
        echo "Name: ". $this->get_name();
    }
} 
?>